﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace ICSharpCode.WinFormsUI.Controls
{
    public class NContextMenuStrip : System.Windows.Forms.ContextMenuStrip
    {
        public NContextMenuStrip()
        {

        }

        public NContextMenuStrip(System.ComponentModel.IContainer container) : base(container)
        {

        }

        protected override void OnPaint(PaintEventArgs e)
        {
            Graphics g = e.Graphics;
            g.FillRectangle(new SolidBrush(NToolStripTheme.BackColor), this.ClientRectangle);
            g.FillRectangle(new SolidBrush(NToolStripTheme.PressedColor), new Rectangle(0, 0, 28, this.Height));

            foreach (ToolStripItem item in this.Items)
            {
                NToolStripPaintUtils.DrawItem(g, item);
            }

            g.DrawRectangle(new Pen(SystemColors.ControlDarkDark), new Rectangle(0, 0, Width - 1, Height - 1));
        }
    }
}
